import request from '@/utils/request'

/**
 * 请求登录
 * @param {Object} data
 * @returns {*} Promise
 */
export const loginAPI = (data) => request({
  url: '/user-service/user/login',
  method: 'POST',
  data
})

/**
 * 图片验证码
 * @param clientToken 随机数
 * @returns {*}
 */
export const getCaptchaImageAPI = (clientToken) => request({
  url: `/user-service/user/imageCode/${clientToken}`,
  responseType: 'blob'
})

/**
 * 获取用户基本信息
 * @param id
 * @returns {*}
 */
export const getUserInfoAPI = (id) => request({
  url: `/user-service/user/${id}`
})

